#include <iostream>
#include <string>
#include <ctime>

using namespace std;

struct Student {
    string sName;
    int sAge;
};

struct Teacher {
    string tName;
    struct Student sArrays[5];
};

void allocateSpace(struct Teacher tArray[], int len) {
    string nameSeed = "abcdefghijklmnopqrstuvwxyz";
    for (int i = 0; i < len; i++) {
        tArray[i].tName = "Teacher_" + to_string(i);
        tArray[i].tName += nameSeed[i];
        for (int j = 0; j < 5; j++) {
            tArray[i].sArrays[j].sName = "Student_" + to_string(i);
            tArray[i].sArrays[j].sName += nameSeed[j];
            int score = rand() % 101;
            tArray[i].sArrays[j].sAge = score;
        }
    }
}

void printInfo(struct Teacher tArray[], int len) {
    for (int i = 0; i < len; i++) {
        cout << "Teacher: " << tArray[i].tName << endl;
        for (int j = 0; j < 5; j++) {
            cout << "\tStudent: " << tArray[i].sArrays[j].sName << " Age: " << tArray[i].sArrays[j].sAge << endl;
        }
    }
}

int main() {
    srand((unsigned int)time(NULL));
    struct Teacher teacher[3];
    int len = sizeof(teacher) / sizeof(teacher[0]);

    allocateSpace(teacher, len);

    printInfo(teacher, len);


    return 0;
}